home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / tex / mf_three.arc / SYM.MF < prev    next >
Text File  |  1988-11-22  |  18KB  |  447 lines

  1. % This file generates the following characters when their codes are known:
  2. % |minus|, |plus_minus|, |o_plus|, |o_times|,
  3. % |cup|, |cap|, |meet|, |join|,
  4. % |down_arrow|, |up_arrow|,
  5. % |left_arrow|, |right_arrow|, |double_arrow|,
  6. % |subset|, |superset|, |elt|,
  7. % |for_all|, |there_exists|, |false_that|,
  8. % |less|, |greater|, |underbar|,
  9. % |neq|, |leq|, |geq|, |eqv|,
  10. % |backslash|, |vertical|,
  11. % |cdot|, |diamond|,
  12. % |left_brace|, |right_brace|,
  13. % |straight_quotes|, |infty|, |integral|.
  14.  
  15. iff known minus: cmchar "Minus sign";
  16. beginarithchar(minus); pickup rule.nib;
  17. lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
  18. draw z1--z2;  % bar
  19. labels(1,2); endchar;
  20.  
  21. iff known plus_minus: cmchar "Plus-or-minus sign";
  22. beginarithchar(plus_minus); pickup rule.nib;
  23. numeric shiftup; shiftup=vround 1.5u;
  24. x1=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3;
  25. .5[y1,y2]=y3=y4=math_axis+shiftup; top y1=h+shiftup; y5=y6=y2;
  26. draw z1--z2;  % stem
  27. draw z3--z4;  % plus bar
  28. draw z5--z6;  % minus bar
  29. labels(1,2,3,4,5,6); endchar;
  30.  
  31. iff known o_plus: cmchar "Circle-plus operator";
  32. beginarithchar(o_plus); pickup light_rule.nib; autorounded;
  33. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  34. circle_points; draw_circle;  % circle
  35. draw z2--z6; draw z4--z8;  % bar and stem
  36. labels(1,2,3,4,5,6,7,8); endchar;
  37.  
  38. iff known o_times: cmchar "Circle-times operator";
  39. beginarithchar(o_times); pickup light_rule.nib; autorounded;
  40. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  41. circle_points; draw_circle;  % circle
  42. draw z1--z5; draw z3--z7;  % diagonals
  43. labels(1,2,3,4,5,6,7,8); endchar;
  44.  
  45. iff known cup: cmchar "Set union sign";
  46. beginchar(cup,12u#,.8asc_height#,0);
  47. italcorr .8asc_height#*slant-.5u#;
  48. adjust_fit(0,0); pickup rule.nib; autorounded;
  49. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  50. y1=good.y h+o; bot y3=-o; y2=y4=2/3[y1,y3]; y5=y1;
  51. draw z1---z2...z3...z4---z5;  % stems and cup
  52. labels(1,2,3,4,5); endchar;
  53.  
  54. iff known cap: cmchar "Set intersection sign";
  55. beginchar(cap,12u#,.8asc_height#,0);
  56. italcorr .8asc_height#*slant-.5u#;
  57. adjust_fit(0,0); pickup rule.nib; autorounded;
  58. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  59. y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
  60. draw z1---z2...z3...z4---z5;  % stems and cap
  61. labels(1,2,3,4,5); endchar;
  62.  
  63. iff known meet: cmchar "Lattice infimum (logical and) sign";
  64. beginchar(meet,12u#,.8asc_height#,0);
  65. italcorr .8asc_height#*slant-.5u#;
  66. adjust_fit(0,0); pickup rule.nib;
  67. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  68. y3=good.y h+o; bot y1=-o; y5=y1;
  69. draw z1--z3--z5;  % diagonals
  70. labels(1,3,5); endchar;
  71.  
  72. iff known join: cmchar "Lattice supremum (logical or) sign";
  73. beginchar(join,12u#,.8asc_height#,0);
  74. italcorr .8asc_height#*slant-.5u#;
  75. adjust_fit(0,0); pickup rule.nib;
  76. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  77. y1=good.y h+o; bot y3=-o; y5=y1;
  78. draw z1--z3--z5;  % diagonals
  79. labels(1,3,5); endchar;
  80.  
  81. iff known down_arrow: cmchar "Downward arrow";
  82. beginchar(down_arrow,9u#,asc_height#,asc_depth#);
  83. adjust_fit(0,0); pickup crisp.nib;
  84. pos1(rule_thickness,0); pos2(rule_thickness,0);
  85. pos3(bar,90); pos4(bar,90);
  86. lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
  87. x0=x1=x2; bot y0=-d; x0-x3=x4-x0=3u+eps;
  88. y3=y4=y0+.24asc_height+eps;
  89. pos5(bar,angle(z4-z0)); z5l=z0;
  90. pos6(bar,angle(z3-z0)); z6l=z0;
  91. z9=.381966[.5[z3,z4],z0];
  92. numeric t; path p; p=z4r{z9-z4}..z6r;
  93. t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
  94. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  95.  --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  96.  --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
  97. penlabels(0,1,2,3,4,5,6,9); endchar;
  98.  
  99. iff known up_arrow: cmchar "Upward arrow";
  100. beginchar(up_arrow,9u#,asc_height#,asc_depth#);
  101. italcorr .76asc_height#*slant+.5crisp#-u#;
  102. adjust_fit(0,0); pickup crisp.nib;
  103. pos1(rule_thickness,0); pos2(rule_thickness,0);
  104. pos3(bar,90); pos4(bar,90);
  105. lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
  106. x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps;
  107. y3=y4=y0-.24asc_height-eps;
  108. pos5(bar,angle(z4-z0)); z5l=z0;
  109. pos6(bar,angle(z3-z0)); z6l=z0;
  110. z9=.381966[.5[z3,z4],z0];
  111. numeric t; path p; p=z4l{z9-z4}..z6r;
  112. t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
  113. filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
  114.  --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  115.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  116. penlabels(0,1,2,3,4,5,6,9); endchar;
  117.  
  118. iff known left_arrow: cmchar "Leftward arrow";
  119. compute_spread(.45x_height#,.55x_height#);
  120. beginchar(left_arrow,18u#,v_center(spread#+rule_thickness#));
  121. adjust_fit(0,0); pickup crisp.nib;
  122. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  123. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  124. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  125. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  126. z9=.381966[.5[z3,z4],z0];
  127. numeric t; path p; p=z4r{z9-z4}..z6r;
  128. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  129. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  130.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  131.  --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
  132. penlabels(0,1,2,3,4,5,6,9); endchar;
  133.  
  134. iff known right_arrow: cmchar "Rightward arrow";
  135. compute_spread(.45x_height#,.55x_height#);
  136. beginchar(right_arrow,18u#,v_center(spread#+rule_thickness#));
  137. adjust_fit(0,0); pickup crisp.nib;
  138. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  139. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  140. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
  141. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  142. z9=.381966[.5[z3,z4],z0];
  143. numeric t; path p; p=z4l{z9-z4}..z6r;
  144. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  145. filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
  146.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  147.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  148. penlabels(0,1,2,3,4,5,6,9); endchar;
  149.  
  150. iff known double_arrow: cmchar "Left-and-right arrow";
  151. compute_spread(.45x_height#,.55x_height#);
  152. beginchar(double_arrow,18u#,
  153.  v_center(if monospace:.6asc_height#+fi spread#+rule_thickness#));
  154. adjust_fit(0,0); pickup crisp.nib;
  155. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  156. y0=y1=y2=math_axis if monospace:+vround.3asc_height fi; lft x0=hround u;
  157. if monospace: x1+.5rule_thickness=hround(w-u) else: x1=.5w fi;
  158. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  159. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  160. z9=.381966[.5[z3,z4],z0];
  161. numeric t; path p; p=z4r{z9-z4}..z6r;
  162. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  163. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  164.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  165.  --z3l{z9-z3}..z0 & cycle;  % left arrowhead and stem
  166. pos11(rule_thickness,90); pos12(rule_thickness,90); pos13(bar,0); pos14(bar,0);
  167. y10=y11=y12=math_axis if monospace:-vround.3asc_height fi;
  168. rt x10=hround(w-u);
  169. if monospace: x11-.5rule_thickness=hround u else: x11=.5w fi;
  170. y13-y10=y10-y14=.24asc_height+eps; x13=x14=x10-3u-eps;
  171. pos15(bar,angle(z14-z10)); z15l=z10; pos16(bar,angle(z13-z10)); z16l=z10;
  172. z19=.381966[.5[z13,z14],z10];
  173. numeric t; path p; p=z14l{z19-z14}..z16r;
  174. t=xpart(p intersectiontimes((0,y12l)--(w,y12l))); x12=xpart point t of p;
  175. filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r)
  176.  --z12l---z11l..z11r---z12r--subpath (t,0) of\\(z13l{z19-z13}..z15r)
  177.  --z13r{z19-z13}..z10 & cycle;  % right arrowhead and stem
  178. penlabels(0,1,2,3,4,5,6,9,10,11,12,13,14,15,16,19); endchar;
  179.  
  180. iff known subset: cmchar "Proper subset sign";
  181. compute_spread(5/4x_height#,3/2x_height#);
  182. beginchar(subset,14u#,v_center(spread#+rule_thickness#));
  183. italcorr h#*slant-u#;
  184. adjust_fit(0,0); pickup rule.nib; autorounded;
  185. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  186. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  187. x4=x5=.5w; y4=y1; y5=y3;
  188. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  189. labels(1,2,3,4,5); endchar;
  190.  
  191. iff known superset: cmchar "Proper superset sign";
  192. compute_spread(5/4x_height#,3/2x_height#);
  193. beginchar(superset,14u#,v_center(spread#+rule_thickness#));
  194. italcorr h#*slant-u#;
  195. adjust_fit(0,0); pickup rule.nib; autorounded;
  196. lft x1=hround 1.5u-eps; x2=w-